cc_test(
  name = "all_test",
  size = "small",
  srcs = ["all_test.cpp"],
  deps = [    # 依赖我自己的库和googletest库
          ":singleton",
          ":observer_pattern",
          ":visitor_pattern",
          ":command_pattern",
          "@com_google_googletest//:gtest_main"
     ],
)

cc_library(
    name  = "singleton",
    srcs  = ['singleton.cpp'],
    hdrs  = ['singleton.h'],
)

cc_library(
    name  = "observer_pattern",
    srcs  = ['observer_pattern.cpp'],
    hdrs  = ['observer_pattern.h'],
)


cc_library(
    name  = "visitor_pattern",
    srcs  = ['visitor_pattern.cpp'],
    hdrs  = ['visitor_pattern.h'],
)


cc_library(
    name  = "command_pattern",
    srcs  = ['command_pattern.cpp'],
    hdrs  = ['command_pattern.h'],
)